package cn.com.open.itembank.service;

import cn.com.open.itembank.exception.PoiException;
import cn.com.open.itembank.common.enums.PaperImportType;
import cn.com.open.itembank.dto.ReturnModel;
import net.lingala.zip4j.exception.ZipException;

import java.io.IOException;

/**
 * 试卷导出接口
 */
public interface PaperExportService {


    /**
     * 试卷导出
     *
     * @param appKey        appKey
     * @param itemBankId    题库ID
     * @param testPaperId   试卷编号
     * @param importType    是否含答案：0，试卷；1，试卷和答案；2，试卷含答案
     * @return the return model
     * @throws Exception the exception
     */
    ReturnModel paperExportWord(String itemBankId, String testPaperId, PaperImportType importType, String appKey) throws PoiException, ZipException, IOException;


    /**
     * 根据题库id获取试卷xml结构
     * @param itemBankId
     * @param appKey
     * @return
     */
    ReturnModel exportPaperXML(String itemBankId,String appKey) throws ZipException, IOException;
}
